package com.nchu.commondevelopmentframework.mapper;

import com.nchu.commondevelopmentframework.entity.Menu;
import com.nchu.commondevelopmentframework.mapper.base.BaseMapper;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @InterfaceName: MenuMapper
 * @description: 菜单权限表对应Mapper接口
 * @author: Li Chuanwei
 * @date: 2024/02/13 11:20
 **/
@Mapper
public interface MenuMapper extends BaseMapper<Menu> {
    /**
     * 根据用户ID查询权限
     *
     * @param userId 用户ID
     * @return 权限列表
     */
    List<String> selectPermsByUserId(Long userId);

    /**
     * 根据用户ID查询菜单
     *
     * @param userId 用户ID
     * @return 菜单列表
     */
    List<Menu> selectMenusByUserId(Long userId);

    /**
     * 查询全部菜单
     *
     * @return 全部菜单列表
     */
    List<Menu> selectAllMenus();
}
